<?php
session_start();
require("../bin/common.php");
checkInstall();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Error - Vanadium Patch Mananger</title>
<link href="../lib/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../lib/script.js"></script>
</head>
<body onload="fixSize()" onresize="fixSize()">

<div class="container" id="container">

	<!-- Header -->
	<div class="top">
	Vanadium Patch Manager

	<?php
	dispLogin();
	?>
	</div>
    
	<!-- Left Hand Panel -->
	<div class="left">
		<br /><span class="nav_option"><img src="../lib/gfx/icon_home.gif" width="15" height="15" alt="Home" /> <a href="../home/">Home</a></span><br /><br />
		<span class="nav_tab_option"><img src="../lib/gfx/icon_add.gif" width="12" height="12" alt="Add" /> <a href="../addpatch/">Add Patch</a></span><br /><br />
		<span class="nav_tab_option"><img src="../lib/gfx/icon_edit.gif" width="13" height="16" alt="Edit" /> <a href="../patch/changelog.php">View Changelog</a></span><br /><br />
		<span class="nav_tab_option"><img src="../lib/gfx/icon_edit.gif" width="13" height="16" alt="Edit" /> <a href="../editpatch/">Edit Patch Home</a></span><br /><br />
		<span class="nav_tab_option"><img src="../lib/gfx/icon_setup.gif" width="14" height="16" alt="Setup" /> <a href="../setup/">Setup</a></span><br /><br />
        <span class="nav_tab_tab_option"><img src="../lib/gfx/icon_edit.gif" width="13" height="16" alt="Edit" /> <a href="../setup/neoncube.php">Neoncube.ini</a></span><br /><br />
        <span class="nav_tab_tab_option"><img src="../lib/gfx/icon_account.gif" width="14" height="14" alt="Accounts" /> <a href="../setup/accounts.php">Accounts</a></span><br /><br />
        <span class="nav_tab_tab_option"><img src="../lib/gfx/icon_cp.gif" width="16" height="16" alt="Control Panel" /> <a href="../setup/cpanel.php">Control Panel</a></span>
	</div>
    
	<!-- Body Content Container -->
	<div class="content_container" id="content_container">
    
		<!--Content Title -->
		<div class="content_title">
			Error
		</div>
        
		<!--Content Body -->
		<div class="content_body">
        	<?php
		
			$type = $_GET['type'];
			
			if (isset($type)) {
				echo "An error occured whilst attempting to log in.<br /><br />";
			}
			else {
				echo "No error was made, or it is undefined. Please report this to a member of development.";
			}
			
			if ($type == "loggedin") {
				echo "<strong>Error Type:</strong> Session Error<br />
			<strong>Details:</strong> You are already logged in, you must log out before trying to log in again.<br /><br />Please logout at the top right hand corner of the screen.";
			}
			elseif ($type == "default") {
				echo "<strong>Error Type:</strong> Default Value<br />
			<strong>Details:</strong> It seems that the variables posted are default values and do not represent any form of logging in at all, as a result of this the error page was displayed.<br /><br />Please try log in again at the upper right hand corner of the screen.";
			}
			elseif ($type == "blank") {
				echo "<strong>Error Type:</strong> Null<br />
			<strong>Details:</strong> There were no values posted, it seems you may have incorrectly filled out a form.<br /><br />Please try log in again at the upper right hand corner of the screen.";
			}
			elseif ($type == "incorrect") {
				echo "<strong>Error Type:</strong>Incorrect Values<br />
			<strong>Details:</strong>The values posted do not match any accounts. Please remember that the Username and Password combination <strong>are</strong> case sensitive.<br /><br />Please try log in again at the upper right hand corner of the screen.";
			}			
			?>
		</div>
    
	<!--End Content Container-->
	</div>
    
	<!--Footer -->
	<div class="footer">
		Vanadium Patch Manager, A Neoncube Patch Modification.<br />
		GNU General Public License v3 - 2010<br />
		http://code.google.com/p/vanadiumpatch/
	</div>

<!--End Container-->
</div>
</body>
</html>